package com.android.launcher3;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;

public class WidgetPreview extends FrameLayout {

	/**
	 * Creates a new WidgetPreview object.
	 */
	public WidgetPreview(final Context paramContext) {
		this(paramContext, null);
	}

	/**
	 * Creates a new WidgetPreview object.
	 */
	public WidgetPreview(final Context paramContext,
			final AttributeSet paramAttributeSet) {
		this(paramContext, paramAttributeSet, 0);
	}

	/**
	 * Creates a new WidgetPreview object.
	 */
	public WidgetPreview(final Context paramContext,
			final AttributeSet paramAttributeSet, final int paramInt) {
		super(paramContext, paramAttributeSet, paramInt);
		init();
	}

	public boolean dispatchTouchEvent(final MotionEvent paramMotionEvent) {
		return false;
	}

	protected void onLayout(final boolean paramBoolean, final int paramInt1,
			final int paramInt2, final int paramInt3, final int paramInt4) {
		if (getChildCount() > 0) {
			View localView = getChildAt(0);
			int i = localView.getMeasuredWidth();
			int j = localView.getMeasuredHeight();
			int k = (getMeasuredWidth() - i) / 2;
			int m = (getMeasuredHeight() - j) / 2;
			int n = k + i;
			int i1 = m + j;
			localView.layout(k, m, n, i1);
		}
	}

	private void init() {
	}
}
